import {Component, ViewChild} from '@angular/core';
import {App, IonicPage, Tabs} from "ionic-angular";


@IonicPage()
@Component({
  selector: 'page-tabs',
  templateUrl: 'tabs.html'
})
export class TabsPage {

  tab1Root = "WorkPage";
  tab2Root = "ManagePage";
  tab3Root = "ReportPage";
  tab4Root = "MyDataPage";
  @ViewChild('myTabs') tabRef: Tabs;

  constructor(private app: App) {
    //如果session失效则退出到登录页
    if (!sessionStorage.getItem('session')) {
      setTimeout(() => {
        this.app.getRootNav().setRoot('LoginPage');
      }, 1000);
    }
  }


}
